#pragma once

namespace StereoCorrespond {

	using namespace System;
	using namespace System::ComponentModel;
	using namespace System::Collections;
	using namespace System::Windows::Forms;
	using namespace System::Data;
	using namespace System::Drawing;

	/// <summary>
	/// Summary for HarrisOptionWindow
	/// </summary>
	public ref class HarrisOptionWindow : public System::Windows::Forms::Form
	{
	public:
		property Double Differential {
			Double get() {
				return differentialTrackBar->Value/10.0; 
			}
		}
		property Double Integral {
			Double get() {
				return integralTrackBar->Value/10.0; 
			}
		}
		property Double HarrisParam {
			Double get() {
				return harrisTrackBar->Value/100.0; 
			}
		}
		
		HarrisOptionWindow(void)
		{
			InitializeComponent();
		}

	protected:
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		~HarrisOptionWindow()
		{
			if (components)
			{
				delete components;
			}
		}
	private: System::Windows::Forms::Button^  runButton;
	private: System::Windows::Forms::TrackBar^  differentialTrackBar;
	protected: 

	private: System::Windows::Forms::Label^  gaussLabel;
	private: System::Windows::Forms::TrackBar^  integralTrackBar;

	private: System::Windows::Forms::Label^  label1;
	private: System::Windows::Forms::TrackBar^  harrisTrackBar;

	private: System::Windows::Forms::Label^  label2;
	private: System::Windows::Forms::Label^  diffLabel;
	private: System::Windows::Forms::Label^  intLabel;
	private: System::Windows::Forms::Label^  lambdaLabel;



	private:
		/// <summary>
		/// Required designer variable.
		/// </summary>
		System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		void InitializeComponent(void)
		{
			this->runButton = (gcnew System::Windows::Forms::Button());
			this->differentialTrackBar = (gcnew System::Windows::Forms::TrackBar());
			this->gaussLabel = (gcnew System::Windows::Forms::Label());
			this->integralTrackBar = (gcnew System::Windows::Forms::TrackBar());
			this->label1 = (gcnew System::Windows::Forms::Label());
			this->harrisTrackBar = (gcnew System::Windows::Forms::TrackBar());
			this->label2 = (gcnew System::Windows::Forms::Label());
			this->diffLabel = (gcnew System::Windows::Forms::Label());
			this->intLabel = (gcnew System::Windows::Forms::Label());
			this->lambdaLabel = (gcnew System::Windows::Forms::Label());
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->differentialTrackBar))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->integralTrackBar))->BeginInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->harrisTrackBar))->BeginInit();
			this->SuspendLayout();
			// 
			// runButton
			// 
			this->runButton->Location = System::Drawing::Point(238, 204);
			this->runButton->Name = L"runButton";
			this->runButton->Size = System::Drawing::Size(75, 23);
			this->runButton->TabIndex = 6;
			this->runButton->Text = L"Run";
			this->runButton->UseVisualStyleBackColor = true;
			this->runButton->Click += gcnew System::EventHandler(this, &HarrisOptionWindow::runButton_Click);
			// 
			// differentialTrackBar
			// 
			this->differentialTrackBar->Anchor = static_cast<System::Windows::Forms::AnchorStyles>(((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Left) 
				| System::Windows::Forms::AnchorStyles::Right));
			this->differentialTrackBar->Location = System::Drawing::Point(12, 25);
			this->differentialTrackBar->Maximum = 100;
			this->differentialTrackBar->Name = L"differentialTrackBar";
			this->differentialTrackBar->Size = System::Drawing::Size(301, 45);
			this->differentialTrackBar->TabIndex = 5;
			this->differentialTrackBar->Value = 10;
			this->differentialTrackBar->ValueChanged += gcnew System::EventHandler(this, &HarrisOptionWindow::differentialTrackBar_ValueChanged);
			// 
			// gaussLabel
			// 
			this->gaussLabel->AutoSize = true;
			this->gaussLabel->Location = System::Drawing::Point(12, 9);
			this->gaussLabel->Name = L"gaussLabel";
			this->gaussLabel->Size = System::Drawing::Size(63, 13);
			this->gaussLabel->TabIndex = 4;
			this->gaussLabel->Text = L"Differrential:";
			// 
			// integralTrackBar
			// 
			this->integralTrackBar->Anchor = static_cast<System::Windows::Forms::AnchorStyles>(((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Left) 
				| System::Windows::Forms::AnchorStyles::Right));
			this->integralTrackBar->Location = System::Drawing::Point(12, 89);
			this->integralTrackBar->Maximum = 100;
			this->integralTrackBar->Name = L"integralTrackBar";
			this->integralTrackBar->Size = System::Drawing::Size(301, 45);
			this->integralTrackBar->TabIndex = 8;
			this->integralTrackBar->Value = 10;
			this->integralTrackBar->ValueChanged += gcnew System::EventHandler(this, &HarrisOptionWindow::integralTrackBar_ValueChanged);
			// 
			// label1
			// 
			this->label1->AutoSize = true;
			this->label1->Location = System::Drawing::Point(12, 73);
			this->label1->Name = L"label1";
			this->label1->Size = System::Drawing::Size(45, 13);
			this->label1->TabIndex = 7;
			this->label1->Text = L"Integral:";
			// 
			// harrisTrackBar
			// 
			this->harrisTrackBar->Anchor = static_cast<System::Windows::Forms::AnchorStyles>(((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Left) 
				| System::Windows::Forms::AnchorStyles::Right));
			this->harrisTrackBar->Location = System::Drawing::Point(12, 153);
			this->harrisTrackBar->Maximum = 100;
			this->harrisTrackBar->Name = L"harrisTrackBar";
			this->harrisTrackBar->Size = System::Drawing::Size(301, 45);
			this->harrisTrackBar->TabIndex = 10;
			this->harrisTrackBar->Value = 20;
			this->harrisTrackBar->ValueChanged += gcnew System::EventHandler(this, &HarrisOptionWindow::harrisTrackBar_ValueChanged);
			// 
			// label2
			// 
			this->label2->AutoSize = true;
			this->label2->Location = System::Drawing::Point(12, 137);
			this->label2->Name = L"label2";
			this->label2->Size = System::Drawing::Size(69, 13);
			this->label2->TabIndex = 9;
			this->label2->Text = L"Harris param:";
			// 
			// diffLabel
			// 
			this->diffLabel->AutoSize = true;
			this->diffLabel->Location = System::Drawing::Point(87, 9);
			this->diffLabel->Name = L"diffLabel";
			this->diffLabel->Size = System::Drawing::Size(22, 13);
			this->diffLabel->TabIndex = 11;
			this->diffLabel->Text = L"1.0";
			// 
			// intLabel
			// 
			this->intLabel->AutoSize = true;
			this->intLabel->Location = System::Drawing::Point(87, 73);
			this->intLabel->Name = L"intLabel";
			this->intLabel->Size = System::Drawing::Size(22, 13);
			this->intLabel->TabIndex = 11;
			this->intLabel->Text = L"1.0";
			// 
			// lambdaLabel
			// 
			this->lambdaLabel->AutoSize = true;
			this->lambdaLabel->Location = System::Drawing::Point(87, 137);
			this->lambdaLabel->Name = L"lambdaLabel";
			this->lambdaLabel->Size = System::Drawing::Size(28, 13);
			this->lambdaLabel->TabIndex = 11;
			this->lambdaLabel->Text = L"0.10";
			// 
			// HarrisOptionWindow
			// 
			this->AcceptButton = this->runButton;
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->ClientSize = System::Drawing::Size(325, 236);
			this->Controls->Add(this->lambdaLabel);
			this->Controls->Add(this->intLabel);
			this->Controls->Add(this->diffLabel);
			this->Controls->Add(this->harrisTrackBar);
			this->Controls->Add(this->label2);
			this->Controls->Add(this->integralTrackBar);
			this->Controls->Add(this->label1);
			this->Controls->Add(this->runButton);
			this->Controls->Add(this->differentialTrackBar);
			this->Controls->Add(this->gaussLabel);
			this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedDialog;
			this->Name = L"HarrisOptionWindow";
			this->Text = L"HarrisOptionWindow";
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->differentialTrackBar))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->integralTrackBar))->EndInit();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->harrisTrackBar))->EndInit();
			this->ResumeLayout(false);
			this->PerformLayout();

		}
#pragma endregion

	private: System::Void differentialTrackBar_ValueChanged(System::Object^  sender, System::EventArgs^  e);
	private: System::Void integralTrackBar_ValueChanged(System::Object^  sender, System::EventArgs^  e);
	private: System::Void harrisTrackBar_ValueChanged(System::Object^  sender, System::EventArgs^  e);
	private: System::Void runButton_Click(System::Object^  sender, System::EventArgs^  e);
	};
}
